/*
 * frmPersonalStamm.java
 *
 * Created on 2. März 2008, 08:12
 */

package com.googlecode.oskis.admin;
import java.sql.*;
import javax.swing.JOptionPane;
import com.googlecode.oskis.library.misc.ColorConstants;
import com.googlecode.oskis.library.date.DateHelper;
import com.googlecode.oskis.library.date.NOW;
import com.googlecode.oskis.library.db.DBQuery;
import com.googlecode.oskis.library.db.ComboBoxFiller;
import com.googlecode.oskis.library.db.ComboBoxEintrag;
import com.googlecode.oskis.library.db.SQLErrorDialog;
import com.googlecode.oskis.library.db.PLZFinder;

/**
 * Dialog zum Bearbeiten des Personalstammes
 * @author  thomas
 */
public class frmEinrichtungenStamm extends javax.swing.JFrame {
    
    
    private Connection db;
    private DBQuery q;
    
    /** Creates new form frmPersonalStamm */
    public frmEinrichtungenStamm(Connection db) {
        initComponents();
        this.db=db;
        NOW now=new NOW();
        String n="to_timestamp('"+now.getFormattedDate()+"','DD.MM.YYYY HH24:MI:SS')";
        q=new DBQuery(db);
        ComboBoxFiller cbf = new ComboBoxFiller(db);
        cbf.fill(cmbLand, "select land,bezeichnung " +
                "                from xland" +
                "                where "+n+" between datf and datt");  
        refreshTable();
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        lblEinrichtung = new javax.swing.JLabel();
        txtEinrichtung = new javax.swing.JTextField();
        lblName = new javax.swing.JLabel();
        lblLand = new javax.swing.JLabel();
        lblPLZ = new javax.swing.JLabel();
        lblOrt = new javax.swing.JLabel();
        lblStrasse = new javax.swing.JLabel();
        txtName = new javax.swing.JTextField();
        cmbLand = new javax.swing.JComboBox();
        txtPLZ = new javax.swing.JTextField();
        txtOrt = new javax.swing.JTextField();
        txtStrasse = new javax.swing.JTextField();
        jScrollPane1 = new javax.swing.JScrollPane();
        tblEinrichtung = new javax.swing.JTable();
        btnNew = new javax.swing.JButton();
        btnEdit = new javax.swing.JButton();
        btnDelete = new javax.swing.JButton();
        lblDatf = new javax.swing.JLabel();
        lblDatt = new javax.swing.JLabel();
        txtDatf = new javax.swing.JTextField();
        txtDatt = new javax.swing.JTextField();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Einrichtungen");

        lblEinrichtung.setText("Einrichtung");

        txtEinrichtung.setNextFocusableComponent(txtName);
        txtEinrichtung.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                txtEinrichtungFocusGained(evt);
            }
            public void focusLost(java.awt.event.FocusEvent evt) {
                txtEinrichtungFocusLost(evt);
            }
        });

        lblName.setText("Name");

        lblLand.setText("Land");

        lblPLZ.setText("PLZ");

        lblOrt.setText("Ort");

        lblStrasse.setText("Strasse");

        txtName.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                txtNameFocusGained(evt);
            }
            public void focusLost(java.awt.event.FocusEvent evt) {
                txtNameFocusLost(evt);
            }
        });

        cmbLand.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cmbLand.setNextFocusableComponent(txtPLZ);

        txtPLZ.setNextFocusableComponent(txtOrt);
        txtPLZ.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                txtPLZFocusGained(evt);
            }
            public void focusLost(java.awt.event.FocusEvent evt) {
                txtPLZFocusLost(evt);
            }
        });

        txtOrt.setNextFocusableComponent(txtStrasse);
        txtOrt.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                txtOrtFocusGained(evt);
            }
            public void focusLost(java.awt.event.FocusEvent evt) {
                txtOrtFocusLost(evt);
            }
        });

        txtStrasse.setNextFocusableComponent(txtDatf);
        txtStrasse.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                txtStrasseFocusGained(evt);
            }
            public void focusLost(java.awt.event.FocusEvent evt) {
                txtStrasseFocusLost(evt);
            }
        });

        tblEinrichtung.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        tblEinrichtung.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tblEinrichtungMouseClicked(evt);
            }
        });
        jScrollPane1.setViewportView(tblEinrichtung);

        btnNew.setMnemonic('N');
        btnNew.setText("Neu");
        btnNew.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnNewActionPerformed(evt);
            }
        });

        btnEdit.setMnemonic('E');
        btnEdit.setText("Ändern");
        btnEdit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEditActionPerformed(evt);
            }
        });

        btnDelete.setMnemonic('L');
        btnDelete.setText("Löschen");
        btnDelete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDeleteActionPerformed(evt);
            }
        });

        lblDatf.setText("Gült. von");

        lblDatt.setText("Gült. bis");

        txtDatf.setNextFocusableComponent(txtDatt);
        txtDatf.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                txtDatfFocusGained(evt);
            }
            public void focusLost(java.awt.event.FocusEvent evt) {
                txtDatfFocusLost(evt);
            }
        });

        txtDatt.setNextFocusableComponent(txtEinrichtung);
        txtDatt.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                txtDattFocusGained(evt);
            }
            public void focusLost(java.awt.event.FocusEvent evt) {
                txtDattFocusLost(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(btnNew)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btnEdit)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btnDelete))
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 589, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblEinrichtung)
                            .addComponent(lblName)
                            .addComponent(lblLand)
                            .addComponent(lblPLZ)
                            .addComponent(lblOrt)
                            .addComponent(lblStrasse)
                            .addComponent(lblDatf)
                            .addComponent(lblDatt))
                        .addGap(27, 27, 27)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtPLZ, javax.swing.GroupLayout.DEFAULT_SIZE, 500, Short.MAX_VALUE)
                            .addComponent(txtOrt, javax.swing.GroupLayout.DEFAULT_SIZE, 500, Short.MAX_VALUE)
                            .addComponent(txtStrasse, javax.swing.GroupLayout.DEFAULT_SIZE, 500, Short.MAX_VALUE)
                            .addComponent(txtDatf, javax.swing.GroupLayout.DEFAULT_SIZE, 500, Short.MAX_VALUE)
                            .addComponent(txtDatt, javax.swing.GroupLayout.DEFAULT_SIZE, 500, Short.MAX_VALUE)
                            .addComponent(cmbLand, javax.swing.GroupLayout.Alignment.TRAILING, 0, 500, Short.MAX_VALUE)
                            .addComponent(txtName, javax.swing.GroupLayout.DEFAULT_SIZE, 500, Short.MAX_VALUE)
                            .addComponent(txtEinrichtung, javax.swing.GroupLayout.DEFAULT_SIZE, 500, Short.MAX_VALUE))))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblEinrichtung)
                    .addComponent(txtEinrichtung, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblName)
                    .addComponent(txtName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblLand)
                    .addComponent(cmbLand, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblPLZ)
                    .addComponent(txtPLZ, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblOrt)
                    .addComponent(txtOrt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblStrasse)
                    .addComponent(txtStrasse, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblDatf)
                    .addComponent(txtDatf, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblDatt)
                    .addComponent(txtDatt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnNew)
                    .addComponent(btnEdit)
                    .addComponent(btnDelete))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 315, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    
    
    private void refreshTable() {
        NOW now=new NOW();
        String n="to_timestamp('"+now.getFormattedDate()+"','DD.MM.YYYY HH24:MI:SS')";        
        String SQL="select einrichtung,name from xeinrichtung where "+n+" between datf and datt";
        if (q.executeQuery(SQL)) {
            tblEinrichtung.setModel(q.getTableModel());
        } else {
            JOptionPane.showMessageDialog(this,q.getSQLError());
        }
    }
    
    
    
    private void txtEinrichtungFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtEinrichtungFocusGained
        txtEinrichtung.selectAll();
        txtEinrichtung.setBackground(ColorConstants.COLOR_FOCUS);
}//GEN-LAST:event_txtEinrichtungFocusGained

    private void txtNameFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtNameFocusGained
        txtName.selectAll();
        txtName.setBackground(ColorConstants.COLOR_FOCUS);
    }//GEN-LAST:event_txtNameFocusGained

    private void txtPLZFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtPLZFocusGained
        txtPLZ.selectAll();
        txtPLZ.setBackground(ColorConstants.COLOR_FOCUS);
    }//GEN-LAST:event_txtPLZFocusGained

    private void txtOrtFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtOrtFocusGained
        txtOrt.selectAll();
        txtOrt.setBackground(ColorConstants.COLOR_FOCUS);
    }//GEN-LAST:event_txtOrtFocusGained

    private void txtStrasseFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtStrasseFocusGained
        txtStrasse.selectAll();
        txtStrasse.setBackground(ColorConstants.COLOR_FOCUS);
    }//GEN-LAST:event_txtStrasseFocusGained

    private void txtDatfFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtDatfFocusGained
        txtDatf.selectAll();
        txtDatf.setBackground(ColorConstants.COLOR_FOCUS);
    }//GEN-LAST:event_txtDatfFocusGained

    private void txtDattFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtDattFocusGained
        txtDatt.selectAll();
        txtDatt.setBackground(ColorConstants.COLOR_FOCUS);
    }//GEN-LAST:event_txtDattFocusGained

    private void txtEinrichtungFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtEinrichtungFocusLost
        txtEinrichtung.setBackground(ColorConstants.COLOR_NO_FOCUS);
}//GEN-LAST:event_txtEinrichtungFocusLost

    private void txtNameFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtNameFocusLost
        txtName.setBackground(ColorConstants.COLOR_NO_FOCUS);
    }//GEN-LAST:event_txtNameFocusLost

    private void txtPLZFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtPLZFocusLost
        txtOrt.setText(new PLZFinder(db,txtPLZ.getText()).getOrt());
        txtPLZ.setBackground(ColorConstants.COLOR_NO_FOCUS);
    }//GEN-LAST:event_txtPLZFocusLost

    private void txtOrtFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtOrtFocusLost
        txtOrt.setBackground(ColorConstants.COLOR_NO_FOCUS);
    }//GEN-LAST:event_txtOrtFocusLost

    private void txtStrasseFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtStrasseFocusLost
        txtStrasse.setBackground(ColorConstants.COLOR_NO_FOCUS);
    }//GEN-LAST:event_txtStrasseFocusLost

    private void txtDatfFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtDatfFocusLost
        DateHelper dh=new DateHelper(txtDatf.getText());
        dh.setFormatString("dd.MM.yyyy HH:mm:ss");
        if (dh.getFormatSuccess()) {
            txtDatf.setText(dh.getFormattedDate());
        }
        txtDatf.setBackground(ColorConstants.COLOR_NO_FOCUS);
    }//GEN-LAST:event_txtDatfFocusLost

    private void txtDattFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtDattFocusLost
        DateHelper dh=new DateHelper(txtDatt.getText());
        dh.setFormatString("dd.MM.yyyy HH:mm:ss");
        if (dh.getFormatSuccess()) {
            txtDatt.setText(dh.getFormattedDate());
        }
        txtDatt.setBackground(ColorConstants.COLOR_NO_FOCUS);
    }//GEN-LAST:event_txtDattFocusLost

    private void btnNewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnNewActionPerformed
        String einrichtung=txtEinrichtung.getText();
        String name=txtName.getText();
        String land=((ComboBoxEintrag)cmbLand.getSelectedItem()).getKey();
        String plz=txtPLZ.getText();
        String ort=txtOrt.getText();
        String strasse=txtStrasse.getText();
        String datf=txtDatf.getText();
        String datt=txtDatt.getText();
        String SQL="insert into xeinrichtung" +
                "   (einrichtung,name,land,plz,ort,strasse,datf,datt)" +
                "   values('"+einrichtung+"','"+name+"','"+land+"','"+plz+"','"+ort+"','"+strasse+"',"+
                "   to_timestamp('"+datf+"','DD.MM.YYYY HH24:MI:SS'),to_timestamp('"+datt+"','DD.MM.YYYY HH24:MI:SS'))";
        try {
            Statement st=db.createStatement();
            st.execute(SQL);
            st.close();
            refreshTable();
        } catch (SQLException e) {
            new SQLErrorDialog(this,"PG",e,SQL).setVisible(true);
        }
}//GEN-LAST:event_btnNewActionPerformed

    private void tblEinrichtungMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tblEinrichtungMouseClicked
        int row=tblEinrichtung.getSelectedRow();
        String einrichtung=(String)tblEinrichtung.getValueAt(row,0);
        String SQL="select name,land,plz," +
                "          ort,strasse," +
                "          to_char(datf,'DD.MM.YYYY HH24:MI:SS') as datf, to_char(datt,'DD.MM.YYYY HH24:MI:SS') as datt" +
                "   from xeinrichtung " +
                "   where einrichtung='"+einrichtung+"'";
        try {
            Statement st=db.createStatement();
            ResultSet rs=st.executeQuery(SQL);
            if (rs.next()) {
                txtEinrichtung.setText(einrichtung);
                txtName.setText(rs.getString("name"));
                cmbLand.setSelectedItem(new ComboBoxEintrag(rs.getString("land"),""));
                txtPLZ.setText(rs.getString("plz"));
                txtOrt.setText(rs.getString("ort"));
                txtStrasse.setText(rs.getString("strasse"));
                txtDatf.setText(rs.getString("datf"));
                txtDatt.setText(rs.getString("datt"));
            } else {
                JOptionPane.showMessageDialog(this,"Einrichtung "+einrichtung+" exitiert nicht");
            }
        } catch (SQLException e) {
            new SQLErrorDialog(this,"PG",e,SQL).setVisible(true);
        }
}//GEN-LAST:event_tblEinrichtungMouseClicked

    private void btnEditActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEditActionPerformed
        String einrichtung=txtEinrichtung.getText();
        String name=txtName.getText();
        String land=((ComboBoxEintrag)cmbLand.getSelectedItem()).getKey();
        String plz=txtPLZ.getText();
        String ort=txtOrt.getText();
        String strasse=txtStrasse.getText();
        String datf=txtDatf.getText();
        String datt=txtDatt.getText();
        String SQL="update xeinrichtung" +
                "   set name='"+name+"', land='"+land+"', plz='"+plz+"'," +
                "       ort='"+ort+"', strasse='"+strasse+"', datf=to_timestamp('"+datf+"','DD.MM.YYYY HH24:MI:SS')," +
                "       datt=to_timestamp('"+datt+"','DD.MM.YYYY HH24:MI:SS')" +
                "   where einrichtung='"+einrichtung+"'";
        try {
            Statement st=db.createStatement();
            st.execute(SQL);
            st.close();
            refreshTable();
        } catch (SQLException e) {
            new SQLErrorDialog(this,"PG",e,SQL).setVisible(true);
        }
    }//GEN-LAST:event_btnEditActionPerformed

    private void btnDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDeleteActionPerformed
        String einrichtung=txtEinrichtung.getText();
        String SQL="delete from xeinrichtung where einrichtung='"+einrichtung+"'";
        try {
            Statement st=db.createStatement();
            st.execute(SQL);
            st.close();
            refreshTable();
        } catch (SQLException e) {
            new SQLErrorDialog(this,"PG",e,SQL).setVisible(true);
        }        
    }//GEN-LAST:event_btnDeleteActionPerformed
    

    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnDelete;
    private javax.swing.JButton btnEdit;
    private javax.swing.JButton btnNew;
    private javax.swing.JComboBox cmbLand;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JLabel lblDatf;
    private javax.swing.JLabel lblDatt;
    private javax.swing.JLabel lblEinrichtung;
    private javax.swing.JLabel lblLand;
    private javax.swing.JLabel lblName;
    private javax.swing.JLabel lblOrt;
    private javax.swing.JLabel lblPLZ;
    private javax.swing.JLabel lblStrasse;
    private javax.swing.JTable tblEinrichtung;
    private javax.swing.JTextField txtDatf;
    private javax.swing.JTextField txtDatt;
    private javax.swing.JTextField txtEinrichtung;
    private javax.swing.JTextField txtName;
    private javax.swing.JTextField txtOrt;
    private javax.swing.JTextField txtPLZ;
    private javax.swing.JTextField txtStrasse;
    // End of variables declaration//GEN-END:variables
    
}
